package com.czkt.spring_boot_thymeleaf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.spring_boot_thymeleaf.mapper.SysUserMapper;
import com.czkt.spring_boot_thymeleaf.pojo.SysUser;
import com.czkt.spring_boot_thymeleaf.service.SysUserService;
import org.springframework.stereotype.Service;

import java.security.Provider;

@Service
public class  SysUserServicelmpl extends ServiceImpl<SysUserMapper, SysUser>implements SysUserService {

    @Override
    public SysUser login(String userName, String pwd) {
        QueryWrapper<SysUser> queryWrapper =new QueryWrapper<>();
        queryWrapper.lambda().eq(SysUser::getUsrName,userName).eq(SysUser::getUsrPassword,pwd);
        return getOne(queryWrapper);
    }
}
